import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import axios from 'axios'
import Qs from 'qs'
// import {Button} from 'element-ui'//引入单独组件
import 'element-ui/lib/theme-chalk/index.css'
// Vue.component(Button.name,Button)//生效
// 引入工具
import MyUtil from './components/util/myUtil'

Vue.prototype.MyUtil = MyUtil
Vue.use(ElementUI)
Vue.config.productionTip = false
// eslint-disable-next-line no-new
Vue.prototype.$Qs = Qs
// 解决Axios请求不带sessionId问题
axios.defaults.withCredentials = true
axios.defaults.baseURL = 'http://localhost:8080/linearAlgebra/'
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
// axios.defaults.headers.post['Content-Type'] = 'application/json'
Vue.prototype.axios = axios
// eslint-disable-next-line no-new
new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>'
})
